find f(x) by defining a new variable